package com.admin.service.lend_book_service;

import com.pojo.BorInfoBean;
import com.pojo.BorrowerBean;

/**
 *
 */
public interface LendOperate {
    /**
     * 根据用户的身份证查询用户的id
     * @param idCard
     * @return
     */
    BorrowerBean queryUserIdByIdCard(String idCard);

    /**
     * 添加借阅信息
     * @param borInfoBean
     * @return
     */
    boolean addLendInfo(BorInfoBean borInfoBean);

    /**
     * 根据用户的id和书的借阅价格修改库存和余额
     * @param userId
     * @param borrowPrice
     * @return
     */
    boolean reduceUserStockAndBalance(long userId, double borrowPrice);
}
